import React, {Component} from "react";
// StackNavigator用于实现各个页面间的跳转。TabNavigator切换组件，实现同一页面上不同界面的切换。
import {
      createStackNavigator,
      createAppContainer
    } from 'react-navigation';
import {
    AppRegistry,
    StyleSheet,
    Text,
    Button,
    Image,
    View,
    TouchableOpacity
} from 'react-native';

import Page1 from './updown';
import HomePage from './HomePage';


const RootStack = createStackNavigator({
    HomePage: {
        screen: HomePage
    },

    Page1: {
        screen: Page1,
        navigationOptions: ({navigation}) => ({
            title: "Page1",//动态设置navigationOptions
        })
    },


}, {
    defaultNavigationOptions: {
        // header: null,// 可以通过将header设为null 来禁用StackNavigator的Navigation Bar
    }
});


const AppAsync = createAppContainer(RootStack);

export default AppAsync;
